package game.map;

import common.Log;

import game.map.block.BlockMap;
import game.physics.CollisionGroup_I;

public class Map {
	public Map(MapInfo mapInfo) {
		if(mapInfo == null) {
			mapInfo = new MapInfo(1, 1, 1, 1);
		}
		_BlockMap = new BlockMap(mapInfo);
		_MapInfo = mapInfo;
	}
	
	private MapInfo _MapInfo;
	private BlockMap _BlockMap;
	
	public MapInfo getMapInfo() {
		return _MapInfo;
	}
	public CollisionGroup_I getBlockMap() {
		return _BlockMap;
	}
	
	public void redimension(MapInfo mapInfo) {
		if(mapInfo == null) {
			Log.debug("Null mapInfo passed to redimension", this);
		}
		_MapInfo = mapInfo;
		_BlockMap.redimension(mapInfo);
	}
	
}
